package org.example.designPattern.zerenlian.zerenliangongchang;

public class SessionGatewayHandler extends GatewayHandler{
    private boolean play(){
        return true;
    }

    @Override
    public boolean handler() {
        System.out.println("第三关-->用户会话拦截");
        boolean score = play();
        if(score){
            //分数>=80 并且存在下一关才进入下一关
            if(this.next != null){
                return this.next.handler();
            }
        }
        return score;
    }
}
